/**
 ****************************************************************************
 * Copyright (C) Marcelo F. Ochoa. All rights reserved.                      *
 * ------------------------------------------------------------------------- *
 * This software is published under the terms of the Apache Software License *
 * version 1.1, a copy of which has been included  with this distribution in *
 * the LICENSE file.                                                         *
 */

package com.prism.oracle;

import java.sql.Connection;
import java.sql.SQLException;

import javax.servlet.http.HttpServletRequest;

import com.prism.ConnInfo;
import com.prism.DBConnection;
import com.prism.DBFactory;
import com.prism.DownloadRequest;
import com.prism.SPProc;
import com.prism.UploadRequest;

/**
 * This class plays the rol of a ConcreteFactory of the Abstract Factory pattern
 * Implements the operations to create concrete products (Data Bases)<BR>
 * <BR>
 * Modified: 3/Nov/2003 by <a href="mailto:pyropunk@usa.net">Alexander Graesser</a> (LXG)<BR>
 * Changes : <UL><LI>Added log4j logging</LI>
 *           <LI>JavDoc cleanup</LI>
 *           <LI>code cleanup</LI></UL>
 */
public class DB7xFactory extends DBFactory {
  public DB7xFactory() {
    // LXG: call to super is generated anyway but put it here for clarity.
    super();
  }

  /** This method returns a concrete SPProcPLSQL instance. */
  public SPProc createSPProc(ConnInfo conn, String procname, Connection sqlconn) throws SQLException {
    SPProcPLSQL cc = new SPProcPLSQL();
    return cc.create(conn, procname, sqlconn);
  }

  /** This method returns a concrete DBConnPLSQL instance. */
  public DBConnection createDBConnection(ConnInfo connInfo) {
    DBConnPLSQL cc = new DBConnPLSQL();
    return cc.create(connInfo);
  }

  /** This method returns a concrete UploadRequest instance. */
  // LXG: removed IOException and SQLException as they are not thrown
  // public UploadRequest createUploadRequest(HttpServletRequest request, DBConnection repositoryConnection) throws IOException, SQLException {
  public UploadRequest createUploadRequest(HttpServletRequest request, DBConnection repositoryConnection) {
    return null;
  }

  /** This method returns a concrete DownloadRequest instance. */
  // LXG: removed IOException and SQLException as they are not thrown
  // public DownloadRequest createDownloadRequest(HttpServletRequest request, HttpServletResponse response, DBConnection repositoryConnection) throws IOException, SQLException {
  public DownloadRequest createDownloadRequest(HttpServletRequest request,  DBConnection repositoryConnection) {
    return null;
  }
}
